package com.jinke.api.component;

import com.jinke.api.modules.app.enums.MemberType;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

/**
 * @projectName:
 * @title: IntegerToMemberTypeConverter
 * @description: int 转 MemberType枚举 value 转换器
 * @see:
 * @author: hhp
 * @version: 1.0.0
 * @createTime: 2024/8/22 16:15
 */
@Component
public class IntegerToMemberTypeConverter implements Converter<Integer, MemberType> {

    @Override
    public MemberType convert(Integer source) {
        return MemberType.fromValue(source);
    }
}
